<?php
class AddController extends AppController
{
    public $name = 'Add';
    public $uses = array('level_prototype');
    public $autoRender = false;

    public function level_prototype_add()
    {
        $data = array(
            array('level_id' => 1,'exp' => 0,'score_bonus' => 0,'gold_bonus' => 0),
            array('level_id' => 2,'exp' => 400,'score_bonus' => 1,'gold_bonus' => 0),
            array('level_id' => 3,'exp' => 1200,'score_bonus' => 1,'gold_bonus' => 1),
            array('level_id' => 4,'exp' => 2600,'score_bonus' => 2,'gold_bonus' => 1),
            array('level_id' => 5,'exp' => 4800,'score_bonus' => 2,'gold_bonus' => 2),
            array('level_id' => 6,'exp' => 8000,'score_bonus' => 3,'gold_bonus' => 2),
            array('level_id' => 7,'exp' => 12400,'score_bonus' => 3,'gold_bonus' => 3),
            array('level_id' => 8,'exp' => 18200,'score_bonus' => 4,'gold_bonus' => 3),
            array('level_id' => 9,'exp' => 25600,'score_bonus' => 4,'gold_bonus' => 4),
            array('level_id' => 10,'exp' => 34800,'score_bonus' => 5,'gold_bonus' => 4),
            array('level_id' => 11,'exp' => 44400,'score_bonus' => 5,'gold_bonus' => 5),
            array('level_id' => 12,'exp' => 54400,'score_bonus' => 6,'gold_bonus' => 5),
            array('level_id' => 13,'exp' => 64800,'score_bonus' => 6,'gold_bonus' => 6),
            array('level_id' => 14,'exp' => 75600,'score_bonus' => 7,'gold_bonus' => 6),
            array('level_id' => 15,'exp' => 86800,'score_bonus' => 7,'gold_bonus' => 7),
            array('level_id' => 16,'exp' => 98400,'score_bonus' => 8,'gold_bonus' => 7),
            array('level_id' => 17,'exp' => 110400,'score_bonus' => 8,'gold_bonus' => 8),
            array('level_id' => 18,'exp' => 122800,'score_bonus' => 9,'gold_bonus' => 8),
            array('level_id' => 19,'exp' => 135600,'score_bonus' => 9,'gold_bonus' => 9),
            array('level_id' => 20,'exp' => 148800,'score_bonus' => 10,'gold_bonus' => 9),
            array('level_id' => 21,'exp' => 162600,'score_bonus' => 10,'gold_bonus' => 10),
            array('level_id' => 22,'exp' => 177000,'score_bonus' => 11,'gold_bonus' => 10),
            array('level_id' => 23,'exp' => 192000,'score_bonus' => 11,'gold_bonus' => 11),
            array('level_id' => 24,'exp' => 207600,'score_bonus' => 12,'gold_bonus' => 11),
            array('level_id' => 25,'exp' => 223800,'score_bonus' => 12,'gold_bonus' => 12),
            array('level_id' => 26,'exp' => 240600,'score_bonus' => 13,'gold_bonus' => 12),
            array('level_id' => 27,'exp' => 258000,'score_bonus' => 13,'gold_bonus' => 13),
            array('level_id' => 28,'exp' => 276000,'score_bonus' => 14,'gold_bonus' => 13),
            array('level_id' => 29,'exp' => 294600,'score_bonus' => 14,'gold_bonus' => 14),
            array('level_id' => 30,'exp' => 313800,'score_bonus' => 15,'gold_bonus' => 14),
            array('level_id' => 31,'exp' => 333800,'score_bonus' => 15,'gold_bonus' => 15),
            array('level_id' => 32,'exp' => 354600,'score_bonus' => 16,'gold_bonus' => 15),
            array('level_id' => 33,'exp' => 376200,'score_bonus' => 16,'gold_bonus' => 16),
            array('level_id' => 34,'exp' => 398600,'score_bonus' => 17,'gold_bonus' => 16),
            array('level_id' => 35,'exp' => 421800,'score_bonus' => 17,'gold_bonus' => 17),
            array('level_id' => 36,'exp' => 445800,'score_bonus' => 18,'gold_bonus' => 17),
            array('level_id' => 37,'exp' => 470600,'score_bonus' => 18,'gold_bonus' => 18),
            array('level_id' => 38,'exp' => 496200,'score_bonus' => 19,'gold_bonus' => 18),
            array('level_id' => 39,'exp' => 522600,'score_bonus' => 19,'gold_bonus' => 19),
            array('level_id' => 40,'exp' => 549800,'score_bonus' => 20,'gold_bonus' => 19),
            array('level_id' => 41,'exp' => 578000,'score_bonus' => 20,'gold_bonus' => 20),
            array('level_id' => 42,'exp' => 607200,'score_bonus' => 21,'gold_bonus' => 20),
            array('level_id' => 43,'exp' => 637400,'score_bonus' => 21,'gold_bonus' => 21),
            array('level_id' => 44,'exp' => 668600,'score_bonus' => 22,'gold_bonus' => 21),
            array('level_id' => 45,'exp' => 700800,'score_bonus' => 22,'gold_bonus' => 22),
            array('level_id' => 46,'exp' => 734000,'score_bonus' => 23,'gold_bonus' => 22),
            array('level_id' => 47,'exp' => 768200,'score_bonus' => 23,'gold_bonus' => 23),
            array('level_id' => 48,'exp' => 803400,'score_bonus' => 24,'gold_bonus' => 23),
            array('level_id' => 49,'exp' => 839600,'score_bonus' => 24,'gold_bonus' => 24),
            array('level_id' => 50,'exp' => 876800,'score_bonus' => 25,'gold_bonus' => 24),
        );

        foreach($data as $num => $level)
        {
            $this->level_prototype->save($level);
        }
    }


}
